<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>React Components</title>
</head>
<body>

<!-- Target Container -->
<div id="react-container"></div>

<!-- React Library & React DOM-->
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>

<script>

    class IngredientsList extends React.Component {
        render() {
          return React.createElement("ul", {className: "ingredients"},
              this.props.items.map((ingredient, i) =>
                  React.createElement("li", { key: i }, ingredient)
              )
          )
        }
    }

    const items = [
      "1 lb Salmon",
      "1 cup Pine Nuts",
      "2 cups Butter Lettuce",
      "1 Yellow Squash",
      "1/2 cup Olive Oil",
      "3 cloves of Garlic"
    ]

    ReactDOM.render(
        React.createElement(IngredientsList, {items}, null),
        document.getElementById('react-container')
    )

</script>

</body>
</html>
